<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: notyoukennk
  Date: 2022/11/27
  Time: 21:27
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page language="java" import="java.util.*,com.spm.pojo.Student"
         pageEncoding="utf-8"%>
<html>
<head>
    <title>选课确认</title>
    <style>
        #customers {
            font-family: Arial, Helvetica, sans-serif;
            border-collapse: collapse;
            width: 100%;
        }

        #customers td, #customers th {
            border: 1px solid #ddd;
            padding: 8px;
        }

        #customers tr:nth-child(even){background-color: #f2f2f2;}

        #customers tr:hover {background-color: #ddd;}

        #customers th {
            padding-top: 12px;
            padding-bottom: 12px;
            text-align: left;
            background-color: #1f1b1a;
            color: white;
        }

    </style>
</head>

    <body>
<table id="customers">
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>班级</th>
        <th>状态</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${studentChooseCourses}" var="StudentChooseCourse">
        <tr>
            <td>
                <c:out value="${StudentChooseCourse.no}" />
            </td>
            <td>
                <c:out value="${StudentChooseCourse.name}" />
            </td>
            <td>
                <c:out value="${StudentChooseCourse.sclass}" />
            </td>
            <td>
                <c:out value="${StudentChooseCourse.chooseState}" />
            </td>
            <c:if test="${StudentChooseCourse.chooseState=='已选中'}">
                <td>
                    <a href="./pre?method=delete&Sid=${StudentChooseCourse.no}">删除</a>
                </td>
            </c:if>
            <c:if test="${StudentChooseCourse.chooseState=='待筛选'}">
                <td>
                    <a href="./pre?method=confirm&Sid=${StudentChooseCourse.no}">确认</a>
                    <a href="./pre?method=delete&Sid=${StudentChooseCourse.no}">删除</a>
                </td>
            </c:if>
        </tr>
    </c:forEach>
</table>
</body>
</html>
